import request from "@/utils/request";


/**
 * 创建一个微信的支付订单
 * @param data
 * @returns {Promise<unknown>}
 */
export function createWxOrder(data){
  return request({
    url: '/wxPay/createWxOrder',
    method: 'post',
    data,
    handleError: true,
  })
}

/**
 * 获取支付订单的信息
 * @param tradeNo
 * @returns {Promise | Promise<unknown>}
 */
export function getWxOrderInfo(tradeNo){
  return request({
    url: `/wxPay/getWxOrderInfo/${tradeNo}`,
    method: 'get',
    handleError: true,
  })
}
